// import vuetify from 'eslint-config-vuetify'

// export default vuetify()
// 万恶的组件库

import eslintPluginVue from 'eslint-plugin-vue'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import typescriptParser from '@typescript-eslint/parser'

export default [
    {
        files: ['**/*.{vue,ts,js}'],
        plugins: {
            vue: eslintPluginVue,
            '@typescript-eslint': typescriptEslint
        },
        languageOptions: {
            parser: typescriptParser,
            parserOptions: {
                ecmaVersion: 'latest',
                sourceType: 'module',
                extraFileExtensions: ['.vue'],
                project: './tsconfig.json'
            }
        },
        rules: {
            // Vue基础规则
            'vue/multi-word-component-names': 'off',
            'vue/no-unused-vars': 'warn',
            'vue/attribute-hyphenation': 'warn',

            // TypeScript基础规则
            '@typescript-eslint/no-unused-vars': 'warn',
            '@typescript-eslint/consistent-type-imports': 'warn',

            // 通用格式化规则
            'indent': ['warn', 2],
            'quotes': ['warn', 'single'],
            'semi': ['warn', 'never'],
            'no-trailing-spaces': 'warn',
            'eol-last': ['warn', 'always']
        }
    }
]
